Convert unix timestamp string to readable dateΒΆ
Convert unix timestamp string to readable date.
Sample Unix timestamp string:
1284105682
Expected Output:
2010-09-10 13:31:22
import datetime
print(
datetime.datetime.fromtimestamp(
int("1284105682")
).strftime('%Y-%m-%d %H:%M:%S')
)
Output:
2010-09-10 13:31:22